//
// Decompiled by Jadx - 367ms
//
package fg;

import android.app.Activity;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.ViewGroup;
import android.widget.TextView;
import androidx.recyclerview.widget.RecyclerView;
import fi.a;
import fi.w;
import java.util.ArrayList;
import r.g;

public final class i extends RecyclerView.h<a> {
    public final ArrayList a;
    public final Activity b;
    public final w c;

    public i(ArrayList arrayList, Activity activity, w wVar) {
        ArrayList arrayList2 = new ArrayList();
        this.a = arrayList2;
        this.b = activity;
        this.c = wVar;
        arrayList2.addAll(arrayList);
    }

    public final int getItemCount() {
        return this.a.size();
    }

    public final void onBindViewHolder(RecyclerView.ae aeVar, int i) {
        a aVar = (a) aeVar;
        a aVar2 = (a) this.a.get(i);
        aVar.getClass();
        boolean isEmpty = TextUtils.isEmpty(aVar2.getValue());
        TextView textView = aVar.c;
        if (isEmpty) {
            textView.setVisibility(View.GONE);
        } else {
            textView.setText(g.w(textView, aVar2.getValue()));
        }
        String key = aVar2.getKey();
        TextView textView2 = aVar.b;
        textView2.setText(g.w(textView2, key));
        aVar.d.setOnClickListener(new h(aVar, this, 0));
        ((RecyclerView.ae) aVar).itemView.setOnClickListener(new h(aVar, this, 1));
    }

    public final RecyclerView.ae onCreateViewHolder(ViewGroup viewGroup, int i) {
        return new a(LayoutInflater.from(viewGroup.getContext()).inflate(-2113142720, viewGroup, false));
    }
}
